<html>
<head>
<LINK REL="StyleSheet" HREF="style.css" TYPE="text/css">
<style type="text/css">
<!--
.style1 {
	font-size: 11px;
	font-weight: bold;
	color: #333333;
}
-->
</style>
</head>
<body background="images/fundo2.JPG" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  <span class="style1">
  <table border="0" cellspacing="0" cellpadding="0" width="380">
  </span>
  <tr> 
    <td class="style1"> 
      <TABLE width="440" height=100% border=0 align=center cellPadding=5 cellSpacing=1 background="images/fundo2.JPG">
<TBODY>
<TR background="images/fundo2.JPG" class="content"> 
<TD colSpan=2 align=right> <div align="center" class="bigf Estilo5">
<?php
$login = stripslashes($_POST['login']);
$oldpwd = stripslashes($_POST['oldpwd']);
$name = stripslashes($_POST['name']);

if ((eregi("[^a-zA-Z0-9_-]", $login)) || 
(eregi("[^a-zA-Z0-9_-]", $oldpwd)) ||
(eregi("[^a-zA-Z0-9_-]", $name))) 
	{
	echo("SQL Injection Detected");
        exit();
	}

require 'config.php';
$msconnect=mssql_connect("$dbhost","$dbuser","$dbpasswd");
$msdb=mssql_select_db("MuOnline",$msconnect);

require_once "sql_inject.php"; 
include_once('sql_check.php');
check_inject();

$bDestroy_session = TRUE; 
$url_redirect = 'index.php'; 
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect)  ; 

$sql_username_check = mssql_query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='$login'"); 
$username_check = mssql_num_rows($sql_username_check); 

$sql_name_check = mssql_query("SELECT Name FROM Character WHERE Name='$name' and AccountID = '$login'"); 
$name_check = mssql_num_rows($sql_name_check); 

$sql_pw_check = mssql_query("SELECT memb__pwd FROM MEMB_INFO WHERE memb__pwd='$oldpwd'"); 
$pw_check = mssql_num_rows($sql_pw_check); 

$sql_points_check = mssql_query("SELECT LevelUpPoint FROM Character WHERE Name='$name'"); 
$points_check = mssql_num_rows($sql_points_check); 
$points_get = mssql_fetch_row( $sql_points_check );

if (empty($login) || empty($oldpwd)) {
    echo "Alguns espaços foram deixados em Branco.";}

elseif ($username_check <= 0){
echo "Seu Login nao existe em nossos Data Bases.<br>"; }

elseif ($name_check <= 0){
echo "O nome do personagem nao existe em nossa Data Bases.<br>"; }

elseif ($pw_check <= 0){ 
echo "Sua senha esta errada.<br>"; }

else 
	{	
	echo "
<LINK REL='StyleSheet' HREF='style.css' TYPE='text/css'>
		
			<table border='0' cellspacing='0' cellpadding='0' width='480'>
  <tr>
    <td> <br><center><font color='#333333'><B>Distribuir Pontos</B></font><br></center>
<br><center><font>Pontos Disponiveis:$points_get[0]&nbsp;&nbsp;</center><br>

      <form name='form1' method='post' action='statupgradedone.php'>




          <table width='100%' border='0' cellspacing='0' cellpadding='0'>
           <tr>
<td height='19'> <div align='right'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Login:</font></div></td>
<td colspan='3'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
			<input name='login' type='text' id='login' maxlength='10' value=$login>
<b></b></font></td>
</tr>
<tr>
<td height='19'> <div align='right'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Personagem</font></div></td>
<td colspan='3'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
<input name='name' type='text' id='name' maxlength='10' value=$name><b>
</b></font></td>
</tr>

<tr>
<td height='26'><div align='right'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Senha:</font></div></td>
<td colspan='3'><B><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
<input name='oldpwd' type='password' id='oldpwd' maxlength='10'>
<b></b></font></td>
</tr><p>
<tr>
<td height='26'><div align='right'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Vitalidade:</font></div></td>
<td colspan='3'><B><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
 <input name='vitality' type='text' id='vitality' maxlength='10'>
<b></b> </font></td>
</tr>
<td height='26'><div align='right'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Força:</font></div></td>
<td colspan='3'><B><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
 <input name='strength' type='text' id='strength' maxlength='10'>
<b></b></font></td>
</tr>
<td height='26'><div align='right'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Energia:</font></div></td>
<td colspan='3'><B><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
 <input name='energy' type='text' id='energy' maxlength='10'>
<b></b></font></td>
</tr>
<td height='26'><div align='right'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Agilidade:</font></div></td>
<td colspan='3'><B><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
 <input name='dexterity' type='text' id='dexterity' maxlength='10'>
<b></b></font></td>
</tr>
<tr>
<td><div align='right'><font size='2' face='Verdana, Arial, Helvetica, sans-serif'></font></div></td>
<td width='15%'>&nbsp;</td>
<td width='12%'><input type='submit' name='Submit' value='Enviar'></td>
<td width='56%'><input type='reset' name='Submit2' value='Borrar'></td>
</tr>
          </table>
        </form>
</div>
</td>
</table>
</body>



";
	}


?>
</body>
</html>
